//
//  OrderSubmitHeader.swift
//  TrafficViolation
//
//  Created by eaglelive on 2017/5/31.
//  Copyright © 2017年 eaglelive. All rights reserved.
//

import UIKit
class OrderSubmitHeader: UIView {
    var orderID = ""
    override func layoutSubviews() {
        super.layoutSubviews()
        self.backgroundColor = appMainColor
        // 背景视图
        let backImageView = UIImageView(image: UIImage(named: "detail_bg"))
        backImageView.frame = CGRect(x: 0, y: 0, width: sd_width, height: sd_height)
        backImageView.contentMode = .scaleToFill
        backImageView.layer.masksToBounds = true
        self.addSubview(backImageView)
        //订单编号
        let orderNo = UILabel.init(frame: CGRect(x: 0, y: 0, width: sd_width, height: 20))
        orderNo.textAlignment = .center // 标题
        orderNo.text = "订单号：\(orderID)"
        orderNo.font = UIFont.systemFont(ofSize: 14) //设置标题字体大小
        orderNo.textColor = UIColor.black
        self.addSubview(orderNo)
        orderNo.snp.makeConstraints { (make) in
            make.center.equalTo(backImageView.snp.center)
        }
    }
}
